package service;

import model.Product;
import java.util.ArrayList;
import java.util.List;

public class ProductService {
    private List<Product> productList = new ArrayList<>();

    public ProductService() {
        // 模拟商品数据
        productList.add(new Product(1, "笔记本电脑", 5999.0));
        productList.add(new Product(2, "智能手机", 3999.0));
        productList.add(new Product(3, "无线耳机", 899.0));
    }

    // 获取所有商品
    public List<Product> getAllProducts() {
        return productList;
    }
}